package com.inossem.warehousemanage_tv.utils;

import com.inossem.warehousemanage_tv.bean.BaseBean;
import com.inossem.warehousemanage_tv.bean.LoginBean;
import com.inossem.warehousemanage_tv.bean.MainBean;
import com.inossem.warehousemanage_tv.bean.MaterialBean;
import com.inossem.warehousemanage_tv.bean.MatsBean;
import com.inossem.warehousemanage_tv.bean.PositionsBean;
import com.inossem.warehousemanage_tv.bean.PpBean;
import com.inossem.warehousemanage_tv.bean.RFIDBean;
import com.inossem.warehousemanage_tv.bean.ShelvesBean;
import com.inossem.warehousemanage_tv.bean.SocketInfoBean;
import com.inossem.warehousemanage_tv.bean.WelBean_New;
import com.inossem.warehousemanage_tv.constant.UrlConstant;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * 接口
 *
 * @author 詹建宇
 * @time on 2019/2/13 17:00
 * @email jianyu.zhan@inossem.com
 */
public interface Api {

    @GET(UrlConstant.URL_LOCATIONS)
    Call<BaseBean<MainBean>> getLocationList(@Query("wh_id") String wh_id);

    @GET(UrlConstant.URL_SHELVES)
    Call<BaseBean<ShelvesBean>> getShelvesList(@Query("location_id") String location_id);

    @GET(UrlConstant.URL_POSITIONS)
    Call<BaseBean<PositionsBean>> getPositionList(@Query("location_id") String location_id, @Query("area_id") String area_id, @Query("position_index1") String position_index1);

    @GET(UrlConstant.URL_MATS)
    Call<BaseBean<MatsBean>> getMatList(@Query("location_id") String location_id, @Query("area_id") String area_id, @Query("position_id") String position_id);

    @GET(UrlConstant.URL_LS)
    Call<BaseBean<MatsBean>> getLSMatList(@Query("wh_id") String wh_id);

    @GET(UrlConstant.URL_WEL)
    Call<BaseBean<WelBean_New>> getWelInfo(@Query("wh_id") String wh_id, @Query("notice_size") String notice_size, @Query("news_size") String news_size, @Query("banner_size") String banner_size, @Query("duty_size") String duty_size, @Query("page_index") String page_index);

    @GET(UrlConstant.URL_LOGIN)
    Call<BaseBean<LoginBean>> login(@Query("wh_id") String wh_id, @Query("password") String password);

    @GET(UrlConstant.URL_PP)
    Call<BaseBean<PpBean>> getDutyList(@Query("wh_id") String wh_id, @Query("page_index") String page_index, @Query("page_size") String page_size);

    @POST(UrlConstant.URL_Purchase)
    Call<BaseBean<MaterialBean>> getMateriel_list(@Body RFIDBean bean);

    @POST(UrlConstant.URL_SOCKET_INFO)
    Call<BaseBean<List<SocketInfoBean>>> getSocketInfo();
}
